package com.yan.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yan.common.to.mq.SeckillOrderTo;
import com.yan.common.utils.PageUtils;
import com.yan.gulimall.order.entity.OrderEntity;
import com.yan.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * ¶©µ¥
 *
 * @author yan
 * @email yan@gmail.com
 * @date 2020-12-22 14:28:42
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 返回订单确认页数据
     * @return
     */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderStatus(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    PayVo getOrderPay(String orderSn);

    OrderEntity getOrderByOrderSn(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handleResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrderTo);

}

